package com.hogocloud.myframe.ui

import android.os.Bundle
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import com.hogocloud.corelibrary.base.BaseFragment
import com.hogocloud.myframe.R
import kotlinx.android.synthetic.main.fragment_test_recycler.*

/**
 *
 * create by gaojunchao
 * on 2020-05-14
 */
class TestRecyclerFragment : BaseFragment() {

    override fun initLayout(): Int  = R.layout.fragment_test_recycler

    override fun initView(view: View, savedInstanceState: Bundle?) {
        val myAdapter = MyAdapter(R.layout.item_text, listOf())
        rv_test.layoutManager = LinearLayoutManager(mContext)
        rv_test.adapter = myAdapter

        myAdapter.setNewData(
            listOf(
                "1", "2", "3", "4", "5",
                "6", "7", "8", "9", "10",
                "11", "12", "13", "14", "15",
                "16", "17", "18", "19", "20"
            )
        )
    }
}